package com.yuntai.pms.model.enums.district;

import java.util.LinkedHashMap;
import java.util.Map;

public enum StateType {

    FORBIDDEN(-1, "停用"),
    NORMAL(1, "启用");

    private int code;
    private String name;
    private final  static Map<Integer,String> stateTypeMap = new LinkedHashMap<Integer,String>();

    public static Map<Integer, String> getStateTypeMap() {
        return stateTypeMap;
    }

    static   {
        stateTypeMap.put(StateType.NORMAL.getCode(), StateType.NORMAL.getName());
        stateTypeMap.put(StateType.FORBIDDEN.getCode(), StateType.FORBIDDEN.getName());
    }
    private StateType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
